package com.cw1.adapter.classadapter;

/**
 * @Author qiuMi
 * @description 手机
 * @Date 2022-11-06 17:48
 **/
public class Phone {
    public void charging(IVoltage5V iVoltage5V){
        if (iVoltage5V.outPut5V() == 5){
            System.out.println("电压为5v,可以充电--");
        }else if (iVoltage5V.outPut5V() > 5){
            System.out.println("电压大于5v,不能充电--");
        }
    }
}
